import { IDataChangeTool } from "../../Interfaces/IUtils";

//数据转换接口
export class DataChangeTool implements IDataChangeTool {
  getParentValue<T>(e: any, attrName: any = "value"): T {
    if (e.parent) {
      if (e.parent[attrName]) return e.parent[attrName];
      else return this.getParentValue(e.parent);
    } else {
      return null;
    }
  }
}
